home *** CD-ROM | disk | FTP | other *** search
- Path: unix.sri.com!usenet
- From: mklenk@updike.sri.com (Mark Klenk)
- Newsgroups: comp.lang.c
- Subject: Re: Problem with sscanf on DEC Alpha
- Date: 11 Jan 1996 18:06:18 GMT
- Organization: SRI International
- Message-ID: <4d3jiq$cgm@unix.sri.com>
- References: <4d3f0c$mfq@colossus.holonet.net>
- Reply-To: mklenk@updike.sri.com
- NNTP-Posting-Host: 204.75.161.40
-
- Mitch Miller wrote:
- >
- >I'm having a problem with a line in my program:
- >
- > sscanf( sInputLine, "%3d%3d%10.4f%10.4f", &iAtom1,
- > &iAtom2, &(F3D->r3DV1), &(F3D->r3DV2) );
- >
- >F3D is a pointer to struct and the struct has double members
- >r3DV1 and r3DV2.
-
- If r3DV1 and r3DV2 are 'double's, your sscanf format
- string should use %10.4lf%10.4lf instead. Otherwise,
- sscanf assumes pointers to float's, which are not
- usually the same size as double's.
-
- ---
-
- mklenk@coronacorp.com (Mark Klenk)
-
-
-
-